package com.todod.base.module.base.dal.mysql.deviceprotocolconversionrecord;

import java.util.*;

import com.todod.base.framework.common.pojo.PageResult;
import com.todod.base.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.todod.base.framework.mybatis.core.mapper.BaseMapperX;
import com.todod.base.module.base.dal.dataobject.deviceaccessdatarecord.DeviceAccessDataRecordDO;
import com.todod.base.module.base.dal.dataobject.deviceprotocolconversionrecord.DeviceProtocolConversionRecordDO;
import org.apache.ibatis.annotations.Mapper;
import com.todod.base.module.base.controller.admin.deviceprotocolconversionrecord.vo.*;

/**
 * 仪器协议转换记录管理 Mapper
 *
 * @author 平台
 */
@Mapper
public interface DeviceProtocolConversionRecordMapper extends BaseMapperX<DeviceProtocolConversionRecordDO> {

    default PageResult<DeviceProtocolConversionRecordDO> selectPage(DeviceProtocolConversionRecordPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<DeviceProtocolConversionRecordDO>()
                .eqIfPresent(DeviceProtocolConversionRecordDO::getWellCode, reqVO.getWellCode())
                .eqIfPresent(DeviceProtocolConversionRecordDO::getDeviceCode, reqVO.getDeviceCode())
                .eqIfPresent(DeviceProtocolConversionRecordDO::getDataProtocolAfter, reqVO.getDataProtocolAfter())
                .eqIfPresent(DeviceProtocolConversionRecordDO::getDataParamsAfter, reqVO.getDataParamsAfter())
                .eqIfPresent(DeviceProtocolConversionRecordDO::getRemark, reqVO.getRemark())
                .betweenIfPresent(DeviceProtocolConversionRecordDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(DeviceProtocolConversionRecordDO::getId));
    }

}